package org.hepeng.hope.entity

import java.io.Serializable
import javax.persistence.Embeddable
import javax.persistence.EmbeddedId
import javax.persistence.Entity
import javax.persistence.Index
import javax.persistence.Table


const val ACCOUNT_ROLE_TABLE_NAME = "account_role"

@Entity
@Table(name = ACCOUNT_ROLE_TABLE_NAME , indexes = [Index(columnList = "accountId,roleId")])
internal data class AccountRole(@EmbeddedId var pk: AccountRolePK
) : Serializable

@Embeddable
internal data class AccountRolePK(var accountId: Long, var roleId: Long) : Serializable
